<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<ui:composition template="templates/kokos_template.xhtml">

	<ui:define name="title">Registration</ui:define>
	<ui:define name="main">
		<h:form>
			<h3>
				<h:outputText value="Fill the fields" />
			</h3>
			<p:messages id="messages" showDetail="true" autoUpdate="true" />
			<h:panelGrid columns="2" id="regGrid">
				<h:outputLabel value="Login: *" />
				<p:inputText label="Login" value="#{registration.group.userLogin}"
					title="enter login" required="true" />
				<h:outputLabel for="pwd1" value="Password: *" />
				<p:password id="pwd1" value="#{registration.account.userPassword}"
					match="pwd2" label="Password" required="true"
					title="enter password" />
				<h:outputLabel for="pwd2" value="Confirm Password: *" />
				<p:password id="pwd2" value="#{registration.account.userPassword}"
					label="Confirmed Password" required="true" title="enter password" />
				<h:outputLabel value="Email: *"/>
				<p:inputText label="Email" value="#{registration.info.userMail}"
					title="Enter Valid Email Address" required="true"/>
			</h:panelGrid>
			<p:commandButton value="OK" type="submit"
				action="#{registration.registerUser}" update="regGrid" />
		</h:form>
	</ui:define>

</ui:composition>
</html>
